home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / gui / precog2_1.lha / Precognition2_1 / src / src.lha / Precognition / GelsSystem.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-12  |  950 b   |  34 lines

  1. #include "GelsSystem.h"
  2. #include <stdlib.h>
  3. #include <string.h> /* included for memset() prototype -- EDB */
  4. #ifndef __GNUC__
  5. #include <clib/graphics_protos.h>
  6. #endif
  7. #ifdef __GNUC__
  8. #include <proto/graphics.h>
  9. #endif
  10. #ifdef __SASC
  11. #include <proto/graphics.h>
  12. #endif
  13.  
  14. void GelsSystem_Init( GelsSystem      *gs,
  15.                       struct RastPort *RPort,
  16.                       BYTE             reserved )
  17.  
  18. {
  19.    memset( gs, 0, sizeof( GelsSystem ) );
  20.  
  21.    gs->GelsInfo.nextLine    = (WORD *)&gs->nextLine[0];
  22.    gs->GelsInfo.lastColor   = (WORD **)&gs->lastColor[0];
  23.    gs->GelsInfo.collHandler = &gs->collHandler;
  24.    gs->GelsInfo.sprRsrvd    = reserved;
  25.    gs->GelsInfo.leftmost    = 0;
  26.    gs->GelsInfo.rightmost   = ( RPort->BitMap->BytesPerRow << 3 ) - 1;
  27.    gs->GelsInfo.topmost     = 0;
  28.    gs->GelsInfo.bottommost  = RPort->BitMap->Rows-1;
  29.  
  30.    RPort->GelsInfo          = &gs->GelsInfo;
  31.    InitGels( &gs->vsHead, &gs->vsTail, &gs->GelsInfo );
  32. }
  33.  
  34.